package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_SYS_RESOURCE"
 *     
*/
public class CcpSysResource implements Serializable {

    /** identifier field */
    private String resGuid;

    /** nullable persistent field */
    private String resTitle;

    /** nullable persistent field */
    private String resIsgroup;

    /** nullable persistent field */
    private String resKind;

    /** nullable persistent field */
    private String resReserved;

    /** full constructor */
    public CcpSysResource(String resGuid, String resTitle, String resIsgroup, String resKind, String resReserved) {
        this.resGuid = resGuid;
        this.resTitle = resTitle;
        this.resIsgroup = resIsgroup;
        this.resKind = resKind;
        this.resReserved = resReserved;
    }

    /** default constructor */
    public CcpSysResource() {
    }

    /** minimal constructor */
    public CcpSysResource(String resGuid) {
        this.resGuid = resGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="RES_GUID"
     *         
     */
    public String getResGuid() {
        return this.resGuid;
    }

    public void setResGuid(String resGuid) {
        this.resGuid = resGuid;
    }

    /** 
     *            @hibernate.property
     *             column="RES_TITLE"
     *             length="150"
     *         
     */
    public String getResTitle() {
        return this.resTitle;
    }

    public void setResTitle(String resTitle) {
        this.resTitle = resTitle;
    }

    /** 
     *            @hibernate.property
     *             column="RES_ISGROUP"
     *             length="1"
     *         
     */
    public String getResIsgroup() {
        return this.resIsgroup;
    }

    public void setResIsgroup(String resIsgroup) {
        this.resIsgroup = resIsgroup;
    }

    /** 
     *            @hibernate.property
     *             column="RES_KIND"
     *             length="100"
     *         
     */
    public String getResKind() {
        return this.resKind;
    }

    public void setResKind(String resKind) {
        this.resKind = resKind;
    }

    /** 
     *            @hibernate.property
     *             column="RES_RESERVED"
     *             length="200"
     *         
     */
    public String getResReserved() {
        return this.resReserved;
    }

    public void setResReserved(String resReserved) {
        this.resReserved = resReserved;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("resGuid", getResGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpSysResource) ) return false;
        CcpSysResource castOther = (CcpSysResource) other;
        return new EqualsBuilder()
            .append(this.getResGuid(), castOther.getResGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getResGuid())
            .toHashCode();
    }

}
